package com.ljw.security.springSecurity.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @FileName LoginController
 * @Description TODO    基于springsecurity的认证、授权
 * @Author ljw
 * @Date 2020/8/31 23:58
 * @Version 1.0
 */
@RestController
public class LoginController {

    /**
     * springsecurity的认证成功后跳转路径
     *
     * @return
     */
    @PostMapping(value = "/login-success", produces = {"text/plain;charset=utf-8"})
    public String loginSuccess() {
        return "登录成功";
    }

    /*** 测试资源1 * @return */
    @GetMapping(value = "/r/r1", produces = {"text/plain;charset=utf-8"})
    public String r1() {
        return " 访问资源1";
    }

    /*** 测试资源2 * @return */
    @GetMapping(value = "/r/r2", produces = {"text/plain;charset=utf-8"})
    public String r2() {
        return " 访问资源2";
    }


}
